2t2r binary weight cell with high on/off ratio background

ABSTRACT

A weight cell and device are herein disclosed. The weight cell includes a first field effect transistor (FET) and a first resistive memory element connected to a drain of the first FET, and a second FET and a second resistive memory element connected to a drain of the second FET. The drain of the first FET is connected to a gate of the second FET and the drain of the second FET is connected to a gate of the first FET.

PRIORITY

This application is based on and claims priority under 35 U.S.C. § 119(e) to a U.S. Provisional Patent Application filed on Feb. 19, 2019 in the United States Patent and Trademark Office and assigned Ser. No. 62/807,534, the entire contents of which are incorporated herein by reference.

BACKGROUND

There is an increasing demand for hardware accelerators for machine learning (ML) applications. The computations that dominate many of these ML applications are matrix vector multiplications. It is possible to do matrix vector multiplication very efficiently in analog through a crossbar network. However, in order to represent the weight, a memory element must be introduced in each weight cell. Static random access memory (SRAM) is large and power inefficient. Non-volatile memory options such as redundant random access memory (RRAM), FLASH or spin-torque transfer magnetic random access memory (STT-MRAM) often suffer from a subset of other challenges including low on/off ratios, high variation and non-compatible programming voltages.

SUMMARY

According to one embodiment, a weight cell is provided. The weight cell includes a first field effect transistor (FET) and a first resistive memory element connected to a drain of the first FET, and a second FET and a second resistive memory element connected to a drain of the second FET. The drain of the first FET is connected to a gate of the second FET and the drain of the second FET is connected to a gate of the first FET.

According to one embodiment, a device is provided. The device includes an array of weight cells, each weight cell including a first field effect transistor (FET) and a first resistive memory element connected to a drain of the first FET, and a second FET and a second resistive memory element connected to a drain of the second FET, the drain of the first FET being connected to a gate of the second FET and the drain of the second FET being connected to a gate of the first FET. The device includes a processor configured to perform inference with the array of weight cells by setting inputs for a row of weight cells from among the array of weight cells according to a logical value of a corresponding neuron and reading outputs of a column of weight cells from among the array of weight cells.

According to one embodiment, a device is provided. The device includes an array of weight cells, each weight cell including a first field effect transistor (FET) and a first resistive memory element connected to a drain of the first FET, and a second FET and a second resistive memory element connected to a drain of the second FET, the drain of the first FET being connected to a gate of the second FET and the drain of the second FET being connected to a gate of the first FET. The processor is configured to write to the resistive memory elements according to a direction of a current supplied to the resistive memory elements.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects, features, and advantages of certain embodiments of the present disclosure will be more apparent from the following detailed description, taken in conjunction with the accompanying drawings, in which:

FIG. 1 is a diagram of a weight cell, according to an embodiment;

FIG. 2 is a diagram of a weight cell array, according to an embodiment;

FIG. 3 is a graph of current output of a weight cell array, according to an embodiment; and

FIG. 4 is a block diagram of an electronic device in a network environment, according to one embodiment.

DETAILED DESCRIPTION

Hereinafter, embodiments of the present disclosure are described in detail with reference to the accompanying drawings. It should be noted that the same elements will be designated by the same reference numerals although they are shown in different drawings. In the following description, specific details such as detailed configurations and components are merely provided to assist with the overall understanding of the embodiments of the present disclosure. Therefore, it should be apparent to those skilled in the art that various changes and modifications of the embodiments described herein may be made without departing from the scope of the present disclosure. In addition, descriptions of well-known functions and constructions are omitted for clarity and conciseness. The terms described below are terms defined in consideration of the functions in the present disclosure, and may be different according to users, intentions of the users, or customs. Therefore, the definitions of the terms should be determined based on the contents throughout this specification.

The present disclosure may have various modifications and various embodiments, among which embodiments are described below in detail with reference to the accompanying drawings. However, it should be understood that the present disclosure is not limited to the embodiments, but includes all modifications, equivalents, and alternatives within the scope of the present disclosure.

Although the terms including an ordinal number such as first, second, etc. may be used for describing various elements, the structural elements are not restricted by the terms. The terms are only used to distinguish one element from another element. For example, without departing from the scope of the present disclosure, a first structural element may be referred to as a second structural element. Similarly, the second structural element may also be referred to as the first structural element. As used herein, the term “and/or” includes any and all combinations of one or more associated items.

The terms used herein are merely used to describe various embodiments of the present disclosure but are not intended to limit the present disclosure. Singular forms are intended to include plural forms unless the context clearly indicates otherwise. In the present disclosure, it should be understood that the terms “include” or “have” indicate existence of a feature, a number, a step, an operation, a structural element, parts, or a combination thereof, and do not exclude the existence or probability of the addition of one or more other features, numerals, steps, operations, structural elements, parts, or combinations thereof.

Unless defined differently, all terms used herein have the same meanings as those understood by a person skilled in the art to which the present disclosure belongs. Terms such as those defined in a generally used dictionary are to be interpreted to have the same meanings as the contextual meanings in the relevant field of art, and are not to be interpreted to have ideal or excessively formal meanings unless clearly defined in the present disclosure.

The electronic device according to one embodiment may be one of various types of electronic devices. The electronic devices may include, for example, a portable communication device (e.g., a smart phone), a computer, a portable multimedia device, a portable medical device, a camera, a wearable device, or a home appliance. According to one embodiment of the disclosure, an electronic device is not limited to those described above.

The terms used in the present disclosure are not intended to limit the present disclosure but are intended to include various changes, equivalents, or replacements for a corresponding embodiment. With regard to the descriptions of the accompanying drawings, similar reference numerals may be used to refer to similar or related elements. A singular form of a noun corresponding to an item may include one or more of the things, unless the relevant context clearly indicates otherwise. As used herein, each of such phrases as “A or B,” “at least one of A and B,” “at least one of A or B,” “A, B, or C,” “at least one of A, B, and C,” and “at least one of A, B, or C,” may include all possible combinations of the items enumerated together in a corresponding one of the phrases. As used herein, terms such as “1^(st),” “2nd,” “first,” and “second” may be used to distinguish a corresponding component from another component, but are not intended to limit the components in other aspects (e.g., importance or order). It is intended that if an element (e.g., a first element) is referred to, with or without the term “operatively” or “communicatively”, as “coupled with,” “coupled to,” “connected with,” or “connected to” another element (e.g., a second element), it indicates that the element may be coupled with the other element directly (e.g., wired), wirelessly, or via a third element.

As used herein, the term “module” may include a unit implemented in hardware, software, or firmware, and may interchangeably be used with other terms, for example, “logic,” “logic block,” “part,” and “circuitry.” A module may be a single integral component, or a minimum unit or part thereof, adapted to perform one or more functions. For example, according to one embodiment, a module may be implemented in a form of an application-specific integrated circuit (ASIC).

In an exemplary case, a resistive weight cell for semi-digital matrix vector multiplication includes two STT memory devices and n-type field effect transistors (FETs). STT memory devices can be in one of two states: a high resistive state or a low resistive state. Unfortunately for STT-MRAM, the ratio of the on resistance to the off resistance is quite low (typically only about 2˜3). This present disclosure provides a weight cell configuration where the on/off ratio is closer to that of the transistor (10⁴-10⁵). Furthermore, the weight cell produces complementary output on two lines, output and output bar. If the product of the input signal and the weight cell weight is a logical 1, then the output line will have a constant current and the output line bar will have zero current. Conversely, if the product is a logical 0, then the output line will have zero current and the output line bar will have a constant current.

FIG. 1 is a diagram of a weight cell 100, according to an embodiment. The weight cell 100 includes a first magneto tunnel junction (MTJ) 102, a second MTJ 104, a first FET 106, and a second FET 108. The FETs 106 and 108 are depicted as n-type FETs (NFET), although p-type FETs may be utilized. The FET 106 includes a drain 110, a gate 112, and a source 114. Likewise, the FET 108 includes a drain 120, a gate 122, and a source 124. The weight cell 100 includes a cross coupling, such that the drain 110 of the FET 106 is connected to the gate 122 of the FET 108 and the drain 120 of the FET 108 is connected to the gate 112 of the FET 106.

The MTJ 102 has a conductance G while the MTJ 104 has a conductance G. The weight cell include four independent external connections: the input V_(in) to the MTJ 102, the input V_(in) to the MTJ 104, a first output I_(out) connected to the source 114 of the FET 106, and a second output I_(out) connected to the source 124 of the FET 108. Each MTJ 102 and 104 can be in one of two states, either a high conductance state G_(H) or a low conductance state G_(L). The cross coupling allows for a high on/off ratio of the outputs. The MTJs 102 and 104 have different conductance states and the configuration determines the logical value. For example, if the weight cell 100 has a logical value of 1, then G=G_(L) and G=G_(H). Likewise, if the weight cell 100 has a logical value of 0, then G=G_(H) and G=G_(L), as shown in Table 1.

TABLE 1 Logical Logical Input V_(in)/V_(in) Weight G G I_(out) I_(out) 0 0 0 G_(H) G_(L) 0 0 0 0 1 G_(L) G_(H) 0 0 1 V_(r) 0 G_(H) G_(L) 0 I_(r) 1 V_(r) 1 G_(L) G_(H) I_(r) 0

During inference, the weight cell performs a multiplication operation in analog based on the potential on the input lines and the state of the weight cell 100. The product is an analog current on the I_(out) output line and a controlled complementary output on the I_(out) output line. The logical value of the input is determined by the same potential applied to both input lines V_(in) and V_(in) . If both lines are set to high, then the input has a logical value of 1. If both lines are set to low, then the input has a logical value of 0. The state of the weight cell 100 is determined by the conductance states of the two MTJs 102 and 104. If G is in the high conductance state and G is in the low conductance state, then the weight cell 100 has a logical value of 0. If G is in the low conductance state and G is in the high conductance state, then the weight cell 100 has a logical value of 1

The output lines I_(out) and I_(out) are held at ground. For logical input values of 1, the potential read voltage V_(r) applied to the input lines corresponds to a value suitable for reads and may be well below that which would result in a write disturb fault.

The outputs are given in terms of the currents put on the output lines. The output current (e.g., read current) is either zero or equal to I_(r)=G_(L)V_(r), in the limit of no leakage current and zero series resistance of the pass transistors, respectively.

FIG. 2 is a diagram of weight cell array 200, according to an embodiment. The array 200 includes weight cells 202-216. To perform inference with the weight cell array 200, the inputs for each row of weight cells (i.e., inputs V_(in) ¹ and V _(in) ¹ for cells 202-208 and inputs V_(in) ² and V _(in) ² for cells 210-216) are set according to the logical value of the corresponding neuron. The output lines (i.e., I_(out)1-I_(out)4B) are then read in parallel along each column of weight cells and the total current on the output is measured and divided by I_(r) to obtain the product of the binary multiplication between the N input neurons and the N binary weights in a given column. Additionally, the dot product can be extracted independently from the current on the output line if the number of logical 1's in the vector of inputs is known. The dot product is then as in Equation (1).

$\begin{matrix} {{\frac{\left( {N - M} \right)\overset{\_}{I_{out}}}{I_{r}}\text{;}\mspace{14mu} {for}\mspace{14mu} M} \leq N} & (1) \end{matrix}$

FIG. 3 is a graph 300 of current output of a weight cell array 200, according to an embodiment. Referring to the weight cell array 200, each weight cell has a logical value. Weight cell 202 has a logical value of 1, weight cell 204 has a logical value of 1, weight cell 206 has a logical value of 0, weight cell 208 has a logical value of 0, weight cell 210 has a logical value of 1, weight cell 212 has a logical value of 0, weight cell 214 has a logical value of 1 and weight cell 216 has a logical value of 0.

Referring to graph 300, the current read at the output of each column is different, representing different values for different pairs of logical values along each column. The output at I_(out)1 is shown at line 302, the outputs at I_(out)2 and I_(out)3 are shown at line 304, and the output at I_(out)4 is shown at line 306.

Writing to a given cell requires separate steps depending on whether the MTJs are being written with a “down” current or an “up” current, which is defined as the direction of the current with respect to the weight cell. Table 2 shows values for writing down, while Table 3 shows values for writing up.

TABLE 2 Selected Row Other Rows Write Down V_(in) V_(in) V_(in) V_(in) I_(out) I_(out) G V_(w) V_(w) 0 0 0 V_(w) G V_(w) V_(w) 0 0 V_(w) 0

A down current write is one where the current is flowing from the top of the weight cell to the bottom of the weight cell. To write a down current, both V_(in) and V_(in) are fixed to a write voltage V_(w), which is a potential that is large enough to write the MTJs and then hold the output line for the MTJ that is to be written at ground while raising the output line of the MTJ that is not to be written to V_(w). In an array, the write down operations are preformed row-by-row, where V_(in) and V_(in) of the row being programmed are set to V_(w) and all the other V_(in) and V_(in) lines to each of the other rows are set to 0.

Table 3 shows values for writing up.

TABLE 3 Selected Other Column Columns Write Up V_(in) V_(in) I_(out) I_(out) I_(out) I_(out) G 0 V_(w) V_(w) V_(w) 0 0 G V_(w) 0 V_(w) V_(w) 0 0

An up current write is one where the current is flowing from the bottom of the weight cell to the top of the weight cell. To write an up current, both I_(out) and I_(out) are held to V_(w) and the input line of the MTJ that is to be written up is set to ground while the other MTJ is set to V_(w). In an array, the write up operations are performed column-by-column, where a given column is enabled for writing up by setting I_(out) and I_(out) to V_(w) and setting all the other I_(out) and I_(out) lines corresponding to the remaining columns to 0.

Other non-volatile memory technologies may be utilized in place of the STT-MRAM, such as pulse code modulation (PCM), Flash, ferroelectric random access memory (FeRAM), resistive random access memory (RRAM), etc. The transistors can be implemented alternatively with p-type field effect transistors. With PFETs, the polarities are all reversed for inference and writes.

FIG. 4 is a block diagram of an electronic device 401 in a network environment 400, according to one embodiment. Referring to FIG. 4, the electronic device 401 in the network environment 400 may communicate with an electronic device 402 via a first network 498 (e.g., a short-range wireless communication network), or an electronic device 404 or a server 408 via a second network 499 (e.g., a long-range wireless communication network). The electronic device 401 may communicate with the electronic device 404 via the server 408. The electronic device 401 may include a processor 420, a memory 430, an input device 450, a sound output device 455, a display device 460, an audio module 470, a sensor module 476, an interface 477, a haptic module 479, a camera module 480, a power management module 488, a battery 489, a communication module 490, a subscriber identification module (SIM) 496, or an antenna module 497. A least one (e.g., the display device 460 or the camera module 480) of the components may be omitted from the electronic device 401, or one or more other components may be added to the electronic device 401. Some of the components may be implemented as a single integrated circuit (IC). For example, the sensor module 476 (e.g., a fingerprint sensor, an iris sensor, or an illuminance sensor) may be embedded in the display device 460 (e.g., a display).

The processor 420 may execute, for example, software (e.g., a program 440) to control at least one other component (e.g., a hardware or a software component) of the electronic device 401 coupled with the processor 420, and may perform various data processing or computations. As at least part of the data processing or computations, the processor 420 may load a command or data received from another component (e.g., the sensor module 476 or the communication module 490) in volatile memory 432, process the command or the data stored in the volatile memory 432, and store resulting data in non-volatile memory 434. The processor 420 may include a main processor 421 (e.g., a central processing unit (CPU) or an application processor (AP)), and an auxiliary processor 423 (e.g., a graphics processing unit (GPU), an image signal processor (ISP), a sensor hub processor, or a communication processor (CP)) that is operable independently from, or in conjunction with, the main processor 421. Additionally or alternatively, the auxiliary processor 423 may be adapted to consume less power than the main processor 421, or execute a particular function. The auxiliary processor 423 may be implemented as being separate from, or a part of, the main processor 421.

The auxiliary processor 423 may control at least some of the functions or states related to at least one component (e.g., the display device 460, the sensor module 476, or the communication module 490) among the components of the electronic device 401, instead of the main processor 421 while the main processor 421 is in an inactive (e.g., sleep) state, or together with the main processor 421 while the main processor 421 is in an active state (e.g., executing an application). The auxiliary processor 423 (e.g., an image signal processor or a communication processor) may be implemented as part of another component (e.g., the camera module 480 or the communication module 490) functionally related to the auxiliary processor 423.

The memory 430 may store various data used by at least one component (e.g., the processor 420 or the sensor module 476) of the electronic device 401. The various data may include, for example, software (e.g., the program 440) and input data or output data for a command related thereto. The memory 430 may include the volatile memory 432 or the non-volatile memory 434.

The program 440 may be stored in the memory 430 as software, and may include, for example, an operating system (OS) 442, middleware 444, or an application 446.

The input device 450 may receive a command or data to be used by other component (e.g., the processor 420) of the electronic device 401, from the outside (e.g., a user) of the electronic device 401. The input device 450 may include, for example, a microphone, a mouse, or a keyboard.

The sound output device 455 may output sound signals to the outside of the electronic device 401. The sound output device 455 may include, for example, a speaker or a receiver. The speaker may be used for general purposes, such as playing multimedia or recording, and the receiver may be used for receiving an incoming call. The receiver may be implemented as being separate from, or a part of, the speaker.

The display device 460 may visually provide information to the outside (e.g., a user) of the electronic device 401. The display device 460 may include, for example, a display, a hologram device, or a projector and control circuitry to control a corresponding one of the display, hologram device, and projector. The display device 460 may include touch circuitry adapted to detect a touch, or sensor circuitry (e.g., a pressure sensor) adapted to measure the intensity of force incurred by the touch.

The audio module 470 may convert a sound into an electrical signal and vice versa. The audio module 470 may obtain the sound via the input device 450, or output the sound via the sound output device 455 or a headphone of an external electronic device 402 directly (e.g., wired) or wirelessly coupled with the electronic device 401.

The sensor module 476 may detect an operational state (e.g., power or temperature) of the electronic device 401 or an environmental state (e.g., a state of a user) external to the electronic device 401, and then generate an electrical signal or data value corresponding to the detected state. The sensor module 476 may include, for example, a gesture sensor, a gyro sensor, an atmospheric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an infrared (IR) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor.

The interface 477 may support one or more specified protocols to be used for the electronic device 401 to be coupled with the external electronic device 402 directly (e.g., wired) or wirelessly. The interface 477 may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, a secure digital (SD) card interface, or an audio interface.

A connecting terminal 478 may include a connector via which the electronic device 401 may be physically connected with the external electronic device 402. The connecting terminal 478 may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).

The haptic module 479 may convert an electrical signal into a mechanical stimulus (e.g., a vibration or a movement) or an electrical stimulus which may be recognized by a user via tactile sensation or kinesthetic sensation. The haptic module 479 may include, for example, a motor, a piezoelectric element, or an electrical stimulator.

The camera module 480 may capture a still image or moving images. The camera module 480 may include one or more lenses, image sensors, image signal processors, or flashes.

The power management module 488 may manage power supplied to the electronic device 401. The power management module 488 may be implemented as at least part of, for example, a power management integrated circuit (PMIC).

The battery 489 may supply power to at least one component of the electronic device 401. The battery 489 may include, for example, a primary cell which is not rechargeable, a secondary cell which is rechargeable, or a fuel cell.

The communication module 490 may support establishing a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device 401 and the external electronic device (e.g., the electronic device 402, the electronic device 404, or the server 408) and performing communication via the established communication channel. The communication module 490 may include one or more communication processors that are operable independently from the processor 420 (e.g., the AP) and supports a direct (e.g., wired) communication or a wireless communication. The communication module 490 may include a wireless communication module 492 (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module 494 (e.g., a local area network (LAN) communication module or a power line communication (PLC) module). A corresponding one of these communication modules may communicate with the external electronic device via the first network 498 (e.g., a short-range communication network, such as Bluetooth™, wireless-fidelity (Wi-Fi) direct, or a standard of the Infrared Data Association (IrDA)) or the second network 499 (e.g., a long-range communication network, such as a cellular network, the Internet, or a computer network (e.g., LAN or wide area network (WAN)). These various types of communication modules may be implemented as a single component (e.g., a single IC), or may be implemented as multiple components (e.g., multiple ICs) that are separate from each other. The wireless communication module 492 may identify and authenticate the electronic device 401 in a communication network, such as the first network 498 or the second network 499, using subscriber information (e.g., international mobile subscriber identity (IMSI)) stored in the subscriber identification module 496.

The antenna module 497 may transmit or receive a signal or power to or from the outside (e.g., the external electronic device) of the electronic device 401. The antenna module 497 may include one or more antennas, and, therefrom, at least one antenna appropriate for a communication scheme used in the communication network, such as the first network 498 or the second network 499, may be selected, for example, by the communication module 490 (e.g., the wireless communication module 492). The signal or the power may then be transmitted or received between the communication module 490 and the external electronic device via the selected at least one antenna.

At least some of the above-described components may be mutually coupled and communicate signals (e.g., commands or data) therebetween via an inter-peripheral communication scheme (e.g., a bus, a general purpose input and output (GPIO), a serial peripheral interface (SPI), or a mobile industry processor interface (MIPI)).

According to one embodiment, commands or data may be transmitted or received between the electronic device 401 and the external electronic device 404 via the server 408 coupled with the second network 499. Each of the electronic devices 402 and 404 may be a device of a same type as, or a different type, from the electronic device 401. All or some of operations to be executed at the electronic device 401 may be executed at one or more of the external electronic devices 402, 404, or 408. For example, if the electronic device 401 should perform a function or a service automatically, or in response to a request from a user or another device, the electronic device 401, instead of, or in addition to, executing the function or the service, may request the one or more external electronic devices to perform at least part of the function or the service. The one or more external electronic devices receiving the request may perform the at least part of the function or the service requested, or an additional function or an additional service related to the request, and transfer an outcome of the performing to the electronic device 401. The electronic device 401 may provide the outcome, with or without further processing of the outcome, as at least part of a reply to the request. To that end, a cloud computing, distributed computing, or client-server computing technology may be used, for example.

One embodiment may be implemented as software (e.g., the program 440) including one or more instructions that are stored in a storage medium (e.g., internal memory 436 or external memory 438) that is readable by a machine (e.g., the electronic device 401). For example, a processor of the electronic device 401 may invoke at least one of the one or more instructions stored in the storage medium, and execute it, with or without using one or more other components under the control of the processor. Thus, a machine may be operated to perform at least one function according to the at least one instruction invoked. The one or more instructions may include code generated by a complier or code executable by an interpreter. A machine-readable storage medium may be provided in the form of a non-transitory storage medium. The term “non-transitory” indicates that the storage medium is a tangible device, and does not include a signal (e.g., an electromagnetic wave), but this term does not differentiate between where data is semi-permanently stored in the storage medium and where the data is temporarily stored in the storage medium.

According to one embodiment, a method of the disclosure may be included and provided in a computer program product. The computer program product may be traded as a product between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., a compact disc read only memory (CD-ROM)), or be distributed (e.g., downloaded or uploaded) online via an application store (e.g., Play Store™), or between two user devices (e.g., smart phones) directly. If distributed online, at least part of the computer program product may be temporarily generated or at least temporarily stored in the machine-readable storage medium, such as memory of the manufacturer's server, a server of the application store, or a relay server.

According to one embodiment, each component (e.g., a module or a program) of the above-described components may include a single entity or multiple entities. One or more of the above-described components may be omitted, or one or more other components may be added. Alternatively or additionally, a plurality of components (e.g., modules or programs) may be integrated into a single component. In this case, the integrated component may still perform one or more functions of each of the plurality of components in the same or similar manner as they are performed by a corresponding one of the plurality of components before the integration. Operations performed by the module, the program, or another component may be carried out sequentially, in parallel, repeatedly, or heuristically, or one or more of the operations may be executed in a different order or omitted, or one or more other operations may be added.

Although certain embodiments of the present disclosure have been described in the detailed description of the present disclosure, the present disclosure may be modified in various forms without departing from the scope of the present disclosure. Thus, the scope of the present disclosure shall not be determined merely based on the described embodiments, but rather determined based on the accompanying claims and equivalents thereto. 

What is claimed is:
 1. A weight cell, comprising: a first field effect transistor (FET) and a first resistive memory element connected to a drain of the first FET; and a second FET and a second resistive memory element connected to a drain of the second FET, wherein the drain of the first FET is connected to a gate of the second FET and the drain of the second FET is connected to a gate of the first FET.
 2. The weight cell of claim 1, wherein the first FET and the second FET comprise n-type FETs.
 3. The weight cell of claim 1, wherein the first FET and the second FET comprise p-type FETs.
 4. The weight cell of claim 1, wherein the first resistive memory element and the second resistive memory element comprise magneto tunnel junctions (MTJs).
 5. The weight cell of claim 1, wherein the first resistive memory element and the second resistive memory element comprise resistive random access memory (RRAM) elements.
 6. The weight cell of claim 1, wherein the first resistive memory element and the second resistive memory element comprise ferroelectric random access memory (FeRAM) elements.
 7. The weight cell of claim 1, wherein the first resistive memory element and the second resistive memory element comprise pulse code modulation (PCM) memory elements.
 8. The weight cell of claim 1, further comprising a first external connection to a source of the first FET and a second external connection to a source of the second FET.
 9. The weight cell of claim 8, further comprising a third external connection to a lead of the first resistive memory element and a fourth external connection to a lead of the second resistive memory element.
 10. The weight cell of claim 1, further comprising a first external connection to a lead of the first resistive memory element and a second external connection to a lead of the second resistive memory element.
 11. The weight cell of claim 10, further comprising a third external connection to a source of the first FET and a fourth external connection to a source of the second FET.
 12. The weight cell of claim 1, wherein the weight cell produces a logical value based on a conductance of the first resistive memory element and a conductance of the second resistive memory element.
 13. A device, comprising: an array of weight cells, each weight cell including: a first field effect transistor (FET) and a first resistive memory element connected to a drain of the first FET; and a second FET and a second resistive memory element connected to a drain of the second FET, the drain of the first FET being connected to a gate of the second FET and the drain of the second FET being connected to a gate of the first FET; and a processor configured to perform inference with the array of weight cells by: setting inputs for a row of weight cells from among the array of weight cells according to a logical value of a corresponding neuron; and reading outputs of a column of weight cells from among the array of weight cells.
 14. The device of claim 13, wherein the processor is further configured to perform inference by measuring a total current from the read outputs and dividing the total current by an output current.
 15. The device of claim 13, wherein the first resistive memory element and the second resistive memory element comprise magneto tunnel junctions (MTJs).
 16. The device of claim 13, wherein the first FETs and the second FETs comprise n-type FETs.
 17. A device, comprising: an array of weight cells, each weight cell including: a first field effect transistor (FET) and a first resistive memory element connected to a drain of the first FET; and a second FET and a second resistive memory element connected to a drain of the second FET, the drain of the first FET being connected to a gate of the second FET and the drain of the second FET being connected to a gate of the first FET; and a processor configured to write to the resistive memory elements according to a direction of a current supplied to the resistive memory elements.
 18. The device of claim 17, wherein the processor is configured to write to the resistive memory elements by fixing voltages input to the weight cell to a write voltage when the direction of the current is down.
 19. The device of claim 17, wherein the processor is configured to write to the resistive memory elements by holding currents output by the weight cell to a write voltage when the direction of the current is up.
 20. The device of claim 17, wherein the first resistive memory element and the second resistive memory element comprise magneto tunnel junctions (MTJs). 